Page({
	data: {
		selected: null,
		list: [{
				"pagePath": "/pages/index/index",
				"text": "首页",
				"iconPath": "/icon/首页.png",
				"selectedIconPath": "/icon/home.png"
			},
			{
				"pagePath": "/pages/mine/mine",
				"text": "我的",
				"iconPath": "/icon/我的.png",
				"selectedIconPath": "/icon/user.png"
			}
		]
	},


	switchTab(e) {
		const {
			index,
			url
		} = e.currentTarget.dataset;
		if (this.data.selected == index || index == undefined) return;
		this.setData({
			selected: index
		});
		wx.switchTab({
			url,
		})
	},


})